package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Department;
import cn.wolfcode.rbac.domain.Role;
import cn.wolfcode.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public abstract interface RoleMapper {

    public abstract int deleteByPrimaryKey(Long id);

    public abstract int insert(Role role);

    public abstract Role selectByPrimaryKey(Long id);

    public abstract List<Role> selectAll();

    public abstract int updateByPrimaryKey(Role role);

    //public abstract int selectForCount(QueryObject paramQueryObject);

    public abstract List<Role> selectForList(QueryObject paramQueryObject);
    //中间表操作
    public abstract void insertRelation(@Param("rid") Long paramLong1, @Param("pid") Long paramLong2);
    //删除用户，需要先删除关系表中的数据
    public abstract void deleteRelation(Long paramLong);
}
